home *** CD-ROM | disk | FTP | other *** search
/ Alde ADA 5 #1 / ADA CD-ROM - Alde Publishing.iso / cm / parser.sid < prev    next >
Encoding:
Text File  |  1988-05-03  |  4.5 KB  |  93 lines

  1. --= SID = SIMTEL20 Ada Software Repository Item Description File = SID =--
  2. -- UNIT NAME         : PARSER
  3. -- VERSION           : 1.0
  4. -- REVIEW CODE       : 
  5. -- DDN ADDRESS       : RCONN at SIMTEL20
  6. -- AUTHOR            : Richard Conn
  7. --                   : Texas Instruments, Ada Technology Branch
  8. --                   : PO Box 801, MS 8007
  9. --                   : McKinney, TX  75069
  10. -- COPYRIGHT         : 
  11. -- DATE CREATED      : 21 July 85
  12. -- DATE RELEASED     : 30 July 85
  13. -- DATE LAST UPDATED : 30 July 85
  14. -- LOCATION          : C2MUG
  15. -- LOCATION          : ASR
  16. -- ENVIRONMENT       : DG MV10000 (ROLM ADE) and
  17. --= CLASSIFICATION       ===============================================--
  18. -- CATEGORY LEVEL 1  : COMPONENTS
  19. -- CATEGORY LEVEL 2  : Parser
  20. -- CATEGORY LEVEL 3  : 
  21. -- CATEGORY LEVEL 4  : 
  22. -- KEYWORD           : parser
  23. -- KEYWORD           : generic parser
  24. -- KEYWORD           : UNIX
  25. -- KEYWORD           : ARGC
  26. -- KEYWORD           : ARGV
  27. -- INDEX             : Parser
  28. -- INDEX             : Generic Parser
  29. -- INDEX             : Parser, Generic
  30. -- INDEX             : ARGC/ARGV
  31. -- TAXONOMY          : 
  32. -- DEPENDENCIES      : 
  33. -- SEE ALSO          : 
  34. --= FILE LISTING         ===============================================--
  35. -- FILE SPECS        : PD:<ADA.COMPONENTS>PARSER.*
  36. -- DIRECTORY DISPLAY :
  37. -- Directory   PD:<ADA.COMPONENTS>
  38. --      File Name     Byte Count  Line Count
  39. --   ---------------  ----------  ----------
  40. --   PARSER.PRO             4258          84
  41. --   PARSER.SRC            11086         274
  42. --   ===============  ==========  ==========
  43. --     2 Files             15344         358
  44. --= ABSTRACT             ===============================================--
  45. --         PARSER is a generic parser that functions in a manner  similar
  46. -- to  the  ARGC/ARGV  parser of UNIX.  It contains one procedure, PARSE,
  47. -- which accepts a string as input and  returns  ARGC,  a  count  of  the
  48. -- number  of  tokens  in the string, and ARGV, a vector of strings, each
  49. -- string containing a token.
  50. -- 
  51. --         PARSER is instantiated with two strings (DEL for DELIMITER and
  52. -- DEL_TOKEN  for  DELIMITER_TOKEN).   The  DEL  string  is  composed  of
  53. -- characters which delimit each token (and are not a part of the token).
  54. -- All characters less than space are automatically delimiters,  and  the
  55. -- DEL  string  should  contain at least one character (such as a space).
  56. -- DEL_TOKEN is a string composed of characters which delimit tokens  and
  57. -- which are tokens themselves.  If "=" is a DEL_TOKEN, for example, then
  58. -- "CAT= DOG" is composed of three tokens, "CAT", "=", and  "DOG",  where
  59. -- if  "=" is a DEL, then "CAT= DOG" is composed of two tokens, "CAT" and
  60. -- "DOG".  This assumes that the space character is a DEL.
  61. -- 
  62. --         PARSER   may  also  be  instantiated  with  ARGC_LIMIT,  which
  63. -- indicates the maximum number of tokens  allowed.   If  this  limit  is
  64. -- exceeded,  then  the  last  ARGV  token  contains the remainder of the
  65. -- string.  The default value of ARGC_LIMIT is 20.
  66. -- 
  67. --         ARG_STRING_LENGTH is the last instantiation option for PARSER.
  68. -- It indicates the maximum length of an ARGV string, and it defaults  to
  69. -- 80.
  70. --= REVISION HISTORY     ===============================================--
  71. --
  72. -- DATE         VERSION    AUTHOR                  HISTORY
  73. -- 19850730        1.0  Richard Conn            Initial Release
  74. --= RELEASE NOTICE       ===============================================--
  75. -- This prologue must be included in all copies of this software.
  76. --
  77. -- This software is released to the Ada community.
  78. -- This software is released to the Public Domain (note:
  79. --   software released to the Public Domain is not subject
  80. --   to copyright protection).
  81. -- Restrictions on use or distribution:  NONE
  82. --= DISCLAIMER           ===============================================--
  83. --     This software and its documentation are provided "AS IS" and
  84. -- without any expressed or implied warranties whatsoever.  No warranties
  85. -- as to performance, merchantability, or fitness for a particular
  86. -- purpose exist.
  87. --     The user is advised to test the software thoroughly before
  88. -- relying on it.  The user must assume the entire risk and liability of
  89. -- using this software.  In no event shall any person or organization of
  90. -- people be held responsible for any direct, indirect, consequential or
  91. -- inconsequential damages or lost profits.
  92. --======================================================================--
  93.